package com.somsoft.handjc.activity.jiancha.xzzf;

import java.util.ArrayList;
import java.util.List;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.somsoft.handjc.activity.R;
import com.somsoft.handjc.util.BaseActivity;
import com.somsoft.handjc.util.MyApplication;
import com.somsoft.handjc.util.Utils;

public class XzzfZhongHeJcMainActivity extends BaseActivity implements OnItemClickListener{

	private ListView listView; 
    @Override 
    public void onCreate(Bundle savedInstanceState){ 
        super.onCreate(savedInstanceState); 
        MyApplication.getInstance().addActivity(this);
        listView = new ListView(this); 
        listView.setAdapter(new ArrayAdapter<String>(this, R.layout.simple_list_item_1,getData())); 
        setContentView(listView); 
        setTitle("行政执法综合监察");
        listView.setOnItemClickListener(this);
        Utils.closeLoading();
    } 

    private List<String> getData(){ 
        List<String> data = new ArrayList<String>(); 
        data.add("回避监察");
        data.add("听证监察");
        data.add("立案监察");
        data.add("移送监察");
        data.add("经济处罚监察");
        data.add("报送备案监察");
       
        return data; 
    }

    /*
	 * 监察类型(1:职能分离监察;2:裁量结果公开监察;3:时限监察;4:回避监察;
	 * 5:听证监察;6:阳光审案监察;7:集体会办监察;8:报送备案监察;
	 * 9:案卷评查监察;10:经济处罚监察;11:同步监察;12:立案监督;13:移送监督)
	 * */
	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
		Intent it = new Intent(XzzfZhongHeJcMainActivity.this,XzzfJcActivity.class);
		switch (arg2) {
		case 0:
			it.putExtra("jcType", "4");
			break;
		case 1:
			it.putExtra("jcType", "5");
			break;
		case 2:
			it.putExtra("jcType", "12");
			break;
		case 3:
			it.putExtra("jcType", "13");
			break;
		case 4:
			it.putExtra("jcType", "10");
			break;
		case 5:
			it.putExtra("jcType", "8");
			break;
		default:
			break;
		}
		Utils.openLoading(XzzfZhongHeJcMainActivity.this);
		startActivity(it);
	} 
}
